<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
</head>

<body>
    <div id="app">
        <h1 v-if = "flag">欢迎来到蜗牛学苑1111！</h1>
        <h1 v-else-if = "flag2">欢迎来到蜗牛学苑2222！</h1>
        <!-- 他们3个是个整体，如果前面2个判断都是false，则else将生效进行判断 -->
        <h1 v-else = "flag2">欢迎来到蜗牛学苑3333！</h1>
    </div>
    <script>
        let vm = new Vue({
            el: "#app",
            //data指的是model
            data() {
                return {
                    flag:true,
                    flag2:false
                }
            }
        });
    </script>
</body>

</html>